package com.af.financeomine.model;

import java.io.Serializable;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.OneToOne;
import java.util.Date;

/**
 * @author  alefabi
 */
@Entity
public class Receita implements Serializable{
	/**
	 * 
	 */
	private static final long serialVersionUID = -4801321600017881398L;
	/**
	 * @uml.property  name="id"
	 */
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	private Long id;
	/**
	 * @uml.property  name="periodo"
	 * @uml.associationEnd  
	 */
	@OneToOne
	@JoinColumn(name="periodo_id")
	private Periodo periodo;
	/**
	 * @uml.property  name="valor"
	 */
	private Double valor;
	/**
	 * @uml.property  name="observacao"
	 */
	@Column(length=500)
	private String observacao;
	
	public Receita() {
	}

	/**
	 * @uml.property  name="id"
	 * @param id the id to set
	 */
	public void setId(Long id) {
		this.id = id;
	}

	/**
	 * @uml.property  name="id"
	 * @return the id
	 */
	public Long getId() {
		return id;
	}

	/**
	 * @uml.property  name="observacao"
	 * @param observacao the observacao to set
	 */
	public void setObservacao(String observacao) {
		this.observacao = observacao;
	}

	/**
	 * @uml.property  name="observacao"
	 * @return the observacao
	 */
	public String getObservacao() {
		return observacao;
	}

	/**
	 * @uml.property  name="periodo"
	 * @return the periodo
	 */
	public Periodo getPeriodo() {
		return periodo;
	}

	/**
	 * @uml.property  name="periodo"
	 * @param periodo the periodo to set
	 */
	public void setPeriodo(Periodo periodo) {
		this.periodo = periodo;
	}

	/**
	 * @uml.property  name="valor"
	 * @return the valor
	 */
	public Double getValor() {
		return valor;
	}

	/**
	 * @uml.property  name="valor"
	 * @param valor the valor to set
	 */
	public void setValor(Double valor) {
		this.valor = valor;
	}

	/**
	 * @uml.property  name="data"
	 */
	private Date data;

	/**
	 * Getter of the property <tt>data</tt>
	 * @return  Returns the data.
	 * @uml.property  name="data"
	 */
	public Date getData() {
		return data;
	}

	/**
	 * Setter of the property <tt>data</tt>
	 * @param data  The data to set.
	 * @uml.property  name="data"
	 */
	public void setData(Date data) {
		this.data = data;
	}
	

}
